package com.liy.cloud.base.entity;

import com.alibaba.fastjson.JSON;
import com.liy.cloud.common.ext.entity.ExtBaseVO;

import java.util.List;
import java.util.Map;

/**
 * @Author: zhangw
 * @Date: 2018/6/22  9:22
 * @Description: 种类参数信息实体类
 **/
public class BaseTypeParamEntity extends ExtBaseVO<String> {

    private static final long serialVersionUID = 1L;

    private String id;

    private String name;

    private String defaultValue;

    private String iscombobox;

    private String comboboxvalue;
    /**
     *用于参数格式(comboboxvalue)值转换
     */
    private List<Map<String, String>> comboboxAll;

    private String isdate;

    private String groupname;

    private String paramSn;

    private String groupsn;

    private String remark;

    /**
     * 用于关联设备种类参数，设备种类编号
     */
    private String equTypeId;
    /**
     * 用于查询条件，设备种类编号： 大类
     */
    private String typeCode;
    /**
     * 用于查询条件，设备种类编号： 小类
     */
    private String devicetype;

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getIscombobox() {
        return iscombobox;
    }

    public void setIscombobox(String iscombobox) {
        this.iscombobox = iscombobox;
    }

    public String getComboboxvalue() {
        return comboboxvalue;
    }

    public void setComboboxvalue(String comboboxvalue) {
        this.comboboxvalue = comboboxvalue;
        if("1".equals(this.iscombobox)){
            this.comboboxAll = (List<Map<String,String>>) JSON.parse(comboboxvalue);
        }
    }

    public String getIsdate() {
        return isdate;
    }

    public void setIsdate(String isdate) {
        this.isdate = isdate;
    }

    public String getGroupname() {
        return groupname;
    }

    public void setGroupname(String groupname) {
        this.groupname = groupname;
    }

    public String getParamSn() {
        return paramSn;
    }

    public void setParamSn(String paramSn) {
        this.paramSn = paramSn;
    }

    public String getGroupsn() {
        return groupsn;
    }

    public void setGroupsn(String groupsn) {
        this.groupsn = groupsn;
    }

    public String getEquTypeId() {
        return equTypeId;
    }

    public void setEquTypeId(String equTypeId) {
        this.equTypeId = equTypeId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<Map<String, String>> getComboboxAll() {
        return comboboxAll;
    }

    public void setComboboxAll(List<Map<String, String>> comboboxAll) {
        this.comboboxAll = comboboxAll;
        this.comboboxvalue = JSON.toJSONString(comboboxAll);
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getDevicetype() {
        return devicetype;
    }

    public void setDevicetype(String devicetype) {
        this.devicetype = devicetype;
    }
}
